---
id: 65824a1b16631c54fa524154
title: الخطوة 26
challengeType: 20
dashedName: step-26
---

# --description--

Next, add another `print()` call and pass the string `'2. List all expenses'`.

# --hints--

You should have `print('2. List all expenses')` in your `while` loop.

```js
({ test: () =>
  {
    const transformedCode = code.replace(/\r/g, "");        
    const foo = __helpers.python.getDef("\n"+transformedCode, "main");
    const {function_body} = foo;    
    assert(function_body.match(/^\s+print\s*\(\s*("|')2\.\sList\sall\sexpenses\1\s*\)/m));
  }
})
```

# --seed--

## --seed-contents--

```py
def add_expense(expenses, amount, category):
    expenses.append({'amount': amount, 'category': category})

def print_expenses(expenses):
    for expense in expenses:
        print(f'Amount: {expense["amount"]}, Category: {expense["category"]}')

def total_expenses(expenses):
    return sum(map(lambda expense: expense['amount'], expenses))

def filter_expenses_by_category(expenses, category):
    return filter(lambda expense: expense['category'] == category, expenses)

def main():
    expenses = []
--fcc-editable-region--
    while True:
        print('\nExpense Tracker')
        print('1. Add an expense')

--fcc-editable-region--
```
